package com.xci.edu.core.configuration;

import com.github.lvyanyang.configuration.CoreAutoConfiguration;
import com.github.lvyanyang.service.CoreService;
import com.xci.edu.EduTrainApplication;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.spring.web.plugins.Docket;

import javax.annotation.Resource;

/**
 * 西交通在线教育项目自动配置
 * @author 吕艳阳 18049047588@qq.com
 * @since 2020-11-12 10:30 上午
 */
@Configuration
@AutoConfigureAfter(CoreAutoConfiguration.class)
public class EduTrainAutoConfiguration {
    @Resource private CoreService coreService;

    @Bean
    public Docket eduTrainModuleApiDocket() {
        return coreService.buildApiDocket("西交通在线教育培训考试平台", EduTrainApplication.class.getPackage().getName());
    }
}
